package cn.edu.nenu.contract.dto;

import java.io.Serializable;


/**
 * @author Kaginux
 * @version 6:28:38 PM May 1, 2011
 */
public abstract class TaskDTO implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private int id;
	private String title;
	private String description;
	private boolean isProject;
	private int ownerId;
	private String ownerName;// In DateBase this attribute is not primary key reference
	private int parentProjectId;
	private String parentProjectName;

	public TaskDTO(int id, String title, String description, boolean isProject,
			int ownerId, String ownerName, int parentProjectId,
			String parentProjectName) {
		super();
		this.id = id;
		this.title = title;
		this.description = description;
		this.isProject = isProject;
		this.ownerId = ownerId;
		this.ownerName = ownerName;
		this.parentProjectId = parentProjectId;
		this.parentProjectName = parentProjectName;
	}
	public int getId() {
		return id;
	}
	public String getTitle() {
		return title;
	}
	public String getDescription() {
		return description;
	}
	public boolean isProject() {
		return isProject;
	}
	public int getOwnerId() {
		return ownerId;
	}
	public String getOwnerName() {
		return ownerName;
	}
	public int getParentProjectId() {
		return parentProjectId;
	}
	public String getParentProjectName() {
		return parentProjectName;
	}
	public void setId(int id) {
		this.id = id;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public void setProject(boolean isProject) {
		this.isProject = isProject;
	}
	public void setOwnerId(int ownerId) {
		this.ownerId = ownerId;
	}
	public void setOwnerName(String ownerName) {
		this.ownerName = ownerName;
	}
	public void setParentProjectId(int parentProjectId) {
		this.parentProjectId = parentProjectId;
	}
	public void setParentProjectName(String parentProjectName) {
		this.parentProjectName = parentProjectName;
	}
	@Override
	public String toString() {
		return "TaskDTO [id=" + id + ", title=" + title + ", description="
				+ description + ", isProject=" + isProject + ", ownerId="
				+ ownerId + ", ownerName=" + ownerName + ", parentProjectId="
				+ parentProjectId + ", parentProjectName=" + parentProjectName
				+ "]";
	}

}
